<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
     xmlns:h="http://java.sun.com/jsf/html"  
     xmlns:f="http://java.sun.com/jsf/core"  
     xmlns:ui="http://java.sun.com/jsf/facelets"  
     template="../template.xhtml">
   
	<ui:define name="content">
		
       		
     	
		<h:form id="userForm">
			<h:messages style="color:darkred"/>
		  
			<h:panelGrid columns="2">  
				<h:outputLabel for="title" value="Title" />  
				<h:inputText id="title" value="#{movieBean.movie.title}" validatorMessage="titulo tem que ter mais que 5 caracteres">
					<f:validateLength minimum="5" />
				</h:inputText>  
   
				<h:outputLabel for="discs" value="Number of Discs" />  
				<h:inputText id="discs" value="#{movieBean.movie.discs}" />  
   
				<h:outputLabel for="format" value="Format" />  
				<h:selectOneMenu id="format" value="#{movieBean.movie.format}">  
                	<f:selectItem itemLabel="DVD" itemValue="DVD" />  
            	<f:selectItem itemLabel="BLU-RAY" itemValue="BLURAY" />  
            	</h:selectOneMenu>  
			</h:panelGrid>  
			<h:commandButton value="Save" action="#{movieBean.save}" />  
		</h:form>  
	</ui:define>  
   
</ui:composition>